import config from "@/config"
import http from "@/utils/request"

export default {
    audittable: {
        add:{
            url: `${config.API_URL}/main/sample/audittable/add`,
            name: "查看",
            post: async function (data, config = {}) {
                return await http.post(this.url, data, config);
            }
        },
        detail: {
            url: `${config.API_URL}/main/sample/audittable/detail`,
            name: "查看",
            post: async function (data, config = {}) {
                return await http.post(this.url, data, config);
            }
        },
        copy: {
            url: `${config.API_URL}/main/sample/audittable/copy`,
            name: "查看",
            post: async function (data, config = {}) {
                return await http.post(this.url, data, config);
            }
        },
        
        save: {
            url: `${config.API_URL}/main/sample/audittable/save`,
            name: "保存",
            post: async function (data, config = {}) {
                return await http.post(this.url, data, {headers: {'Content-Type': 'multipart/form-data'}});
            }
        },
        
        edit: {
            url: `${config.API_URL}/main/sample/audittable/edit`,
            name: "更新初始化",
            post: async function (data, config = {}) {
                return await http.post(this.url, data, config);
            }
        },
        update: {
            url: `${config.API_URL}/main/sample/audittable/update`,
            name: "更新",
            post: async function (data, config = {}) {
                return await http.post(this.url, data, {headers: {'Content-Type': 'multipart/form-data'}});
            }
        },
        cust: {
            url: `${config.API_URL}/main/crm/cust/queryCustContactList`,
            name: "获取联系人详情",
            post: async function (data, config = {}) {
                return await http.post(this.url, data, config);
            }
        },
        confirm: {
            url: `${config.API_URL}/main/sample/audittable/confirm`,
            name: "确认",
            post: async function (data, config = {}) {
                return await http.post(this.url, data, config);
            }
        },
        editReader: {
            url: `${config.API_URL}/main/sample/audittable/editReaderList`,
            name: "权限设置",
            post: async function (data, config = {}) {
                return await http.post(this.url, data, config);
            }
        },
        updateReader: {
            url: `${config.API_URL}/main/sample/audittable/updateReaderList`,
            name: "更新权限设置",
            post: async function (data, config = {}) {
                return await http.post(this.url, data, config);
            }
        },
        exportExcel: {
            url: `${config.API_URL}/main/sample/audittable/exportExcel`,
            name: "导出excel",
            post: async function (data, config = {}) {
                return await http.post(this.url, data, config);
            }
        }
        

    },
    sendSample: {
        add:{
            url: `${config.API_URL}/main/sample/sendSample/add`,
            name: "查看",
            post: async function (data, config = {}) {
                return await http.post(this.url, data, config);
            }
        },
        detail: {
            url: `${config.API_URL}/main/sample/sendSample/detail`,
            name: "查看",
            post: async function (data, config = {}) {
                return await http.post(this.url, data, config);
            }
        },
        save: {
            url: `${config.API_URL}/main/sample/sendSample/save`,
            name: "保存",
            post: async function (data, config = {}) {
                return await http.post(this.url, data,config);
            }
        },
        update: {
            url: `${config.API_URL}/main/sample/sendSample/update`,
            name: "更新",
            post: async function (data, config = {}) {
                return await http.post(this.url, data,config);
            }
        },
        initConfirmCustRecived: {
            url: `${config.API_URL}/main/sample/sendSample/initConfirmCustRecived`,
            name: "初始化客户接收",
            post: async function (data, config = {}) {
                return await http.post(this.url, data,config);
            }
        },
        confirmCustReceived: {
            url: `${config.API_URL}/main/sample/sendSample/confirmCustReceived`,
            name: "确认客户接收",
            post: async function (data, config = {}) {
                return await http.post(this.url, data,config);
            }
        },
        
        
    },
    testResult: {
        add:{
            url: `${config.API_URL}/main/sample/testResult/add`,
            name: "初始化",
            post: async function (data, config = {}) {
                return await http.post(this.url, data, config);
            }
        },
        save: {
            url: `${config.API_URL}/main/sample/testResult/save`,
            name: "保存",
            post: async function (data, config = {}) {
                return await http.post(this.url, data,{headers: {'Content-Type': 'multipart/form-data'}});
            }
        },
        detail:{
            url: `${config.API_URL}/main/sample/testResult/detail`,
            name: "查看",
            post: async function (data, config = {}) {
                return await http.post(this.url, data, config);
            }
        }, 
        update:{
            url: `${config.API_URL}/main/sample/testResult/update`,
            name: "更新",
            post: async function (data, config = {}) {
                return await http.post(this.url, data, config);
            }
        }, 
        confirm:{
            url: `${config.API_URL}/main/sample/testResult/confirm`,
            name: "量产确认",
            post: async function (data, config = {}) {
                return await http.post(this.url, data, config);
            }
        },
        updateConfirm:{
            url: `${config.API_URL}/main/sample/testResult/updateProductionConfirm`,
            name: "修改量产确认",
            post: async function (data, config = {}) {
                return await http.post(this.url, data, config);
            }
        },
        updateConfirm:{
            url: `${config.API_URL}/main/sample/testResult/updateProductionConfirm`,
            name: "修改量产确认",
            post: async function (data, config = {}) {
                return await http.post(this.url, data, config);
            }
        },
        doChangeProductionPlan:{
            url: `${config.API_URL}/main/sample/testResult/doChangeProductionPlan`,
            name: "变更量产计划",
            post: async function (data, config = {}) {
                return await http.post(this.url, data, config);
            }
        },
        
        
    }
    
    
}